home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / public / fax / src / relnotes / Makefile < prev    next >
Makefile  |  1994-08-01  |  5KB  |  154 lines

  1. #    $Header: /usr/people/sam/fax/relnotes/RCS/Makefile,v 1.6 1994/04/14 17:55:26 sam Rel $
  2. #
  3. # FlexFAX Facsimile Software
  4. #
  5. # Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994 Sam Leffler
  6. # Copyright (c) 1991, 1992, 1993, 1994 Silicon Graphics, Inc.
  7. # Permission to use, copy, modify, distribute, and sell this software and 
  8. # its documentation for any purpose is hereby granted without fee, provided
  9. # that (i) the above copyright notices and this permission notice appear in
  10. # all copies of the software and related documentation, and (ii) the names of
  11. # Sam Leffler and Silicon Graphics may not be used in any advertising or
  12. # publicity relating to the software without the specific, prior written
  13. # permission of Sam Leffler and Silicon Graphics.
  14. # THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
  15. # EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
  16. # WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
  17. # IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
  18. # ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
  19. # OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  20. # WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
  21. # LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
  22. # OF THIS SOFTWARE.
  23. #
  24. DEPTH=..
  25. include ${DEPTH}/defs
  26.  
  27. CMM=    \
  28.     ch1.cmm \
  29.     ch2.cmm \
  30.     ch3.cmm \
  31.     ch4.cmm \
  32.     ch5.cmm \
  33.     ch6.cmm \
  34.     ch7.cmm \
  35.     ch8.cmm \
  36.     ${NULL}
  37. AMM    =
  38.  
  39. IDB_TAG    = ${PRODUCT}.man.relnotes
  40. IDB_PATH = /usr/relnotes/${PRODUCT}
  41.  
  42. # It should not be necessary to modify anything below this line.  If 
  43. # changes are made, they should be carefully considered, and reflected
  44. # in the master copy on the source repository.
  45.  
  46. # The following operations are supported:
  47. #
  48. #    make            makes all out-of-date chapters.
  49. #    make contents.out    makes the table of contents, list of tables,
  50. #                and list of figures.
  51. #    make index.out        makes the index.
  52. #    make cover.out        makes the cover sheet.
  53. #    make credit.out        makes the credits page.
  54. #    
  55. #    make book        makes all of the above.
  56. #
  57. #    make <anything>.psv    makes the corresponding .out file, and then
  58. #                psview's it.
  59. #    make ch3.out        makes a specific chapter.
  60. #
  61. #    make clobber        destroy all reproduceable files, so that
  62. #                everything can be rebuilt from scratch.
  63. #
  64. # For the "online" side of the world:
  65. #
  66. #    make all        make all of the packed online chapters and TC
  67. #
  68. #    make install        make and install the online chapters and TC.
  69.  
  70. OUT    = $(CMM:.cmm=.out) $(AMM:.amm=.out)
  71. Z    = $(CMM:.cmm=.z) $(AMM:.amm=.z)
  72. PSV    = $(OUT:.out=.psv)
  73. CFRONT    = cFront
  74.  
  75. default: $(Z)
  76.  
  77. all:    $(Z) TC
  78.  
  79. install:$(Z) TC
  80.     $(INSTALL) -idb $(IDB_TAG) -F $(IDB_PATH) $(Z) TC
  81.  
  82. clean clobber:
  83.     ${RM} -f *.CKP *.BAK *.out *.aux *.z TC contents
  84.  
  85. book:    $(OUT) contents.out index.out cover.out credit.out
  86.  
  87. $(OUT) index.out contents.out:    $(CFRONT)
  88.  
  89. contents: $(OUT)
  90.     ${RM} -f contents
  91.     sed -n -e 's///g' -e '/^TC /s/TC //p' *.aux >> contents
  92.     sed -n -e 's///g' -e '/^FG /s/FG //p' *.aux >> contents
  93.     sed -n -e 's///g' -e '/^TB /s/TB //p' *.aux >> contents
  94.  
  95. contents.out: contents
  96.     psroff $(PSFLAGS) -t -mm -rx2 $(CFRONT) contents > contents.out
  97.  
  98. index: $(OUT)
  99.     ixtool *.aux > index
  100.  
  101. index.out: index
  102.     psroff $(PSFLAGS) -t -mm -rx3 $(CFRONT) index > index.out
  103.  
  104. # Make the online TC.  The TC.online macros are very simple, and just gather
  105. # up the calls to ".H 1 " to output the current chapter number and title,
  106. # separated by a " (t) ".  We slurp out the pseudo-font changes with col -b,
  107. # and then translate the fake tabs "(t)" into real ones.
  108.  
  109. TC: $(CMM) $(AMM)
  110.     echo ".H A" | nroff TC.online $(CMM) - $(AMM) | col -b | \
  111.         sed -n 's: (t) :    :p' > TC
  112.  
  113. # Built-in rules, for turning any ".this" into a ".that".
  114.  
  115. .SUFFIXES: .psv .p .out .amm .cmm .x .z
  116.  
  117. # Turn chapter or appendix source into a postcript output file.
  118. #
  119. # The egrep lines collect "everything but" from the aux files, and show them
  120. # on stderr; otherwise error messages would be hidden in the .aux files.
  121.  
  122. .cmm.out:
  123.     pic $*.cmm | tbl - | eqn | \
  124.         psroff $(PSFLAGS) -t -mm $(CFRONT) - 1>$*.out 2>$*.aux 
  125.     @egrep -v '^(TC|IX|TB|FG|EQ|EX) ' $*.aux 1>&2 || true
  126.  
  127. .amm.out:
  128.     pic $(CFRONT) $*.amm | \
  129.         tbl - | eqn | psroff $(PSFLAGS) -t -mm -rx1 - 1>$*.out 2>$*.aux 
  130.     @egrep -v '^(TC|IX|TB|FG|EQ|EX) ' $*.aux 1>&2 || true
  131.  
  132. # turn non-mm source into postscript output files:
  133.  
  134. .x.out:
  135.     psroff -t > $*.out $*.x
  136.  
  137. # Show a postscript file right now:
  138.  
  139. .out.psv:
  140.     psview $(PSVIEWOPTS) $?
  141.  
  142. # Turn chapter or appendix source into packed nroff files for the online notes:
  143.  
  144. .cmm.z:
  145.     pic $*.cmm | tbl - | eqn | nroff -mm macros.online - 1> $*
  146.     rm -f $*.z ; pack -f $* || true
  147.  
  148. .amm.z:
  149.     pic $*.amm | tbl -| eqn | nroff -mm macros.online - 1> $*
  150.     rm -f $*.z ; pack -f $* || true
  151.